package _09设计工厂模式;

public class Carfactory {
    public static Car createCar(CarTYPE carTYPE){
        if (carTYPE.BenChi.equals(carTYPE)){
            return new BenChi();
        }else if (carTYPE.BaoMa.equals(carTYPE)){
            return new BaoMa();
        }
        return null;
    }
}
